package com.liuhuanss.voiceprint.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 声纹识别配置类
 * 
 * @author liuhuanss
 * @version 1.0
 */
@Component
@Configuration
public class VoiceprintConfig {

    @Value("${voiceprint.api.url}")
    private String requestUrl;
    
    @Value("${voiceprint.api.app-id}")
    private String appId;
    
    @Value("${voiceprint.api.api-secret}")
    private String apiSecret;
    
    @Value("${voiceprint.api.api-key}")
    private String apiKey;
    
    private String defaultGroupId="voiceprint_group_001";
    
    private int maxRetryTimes=3;
    
    private int timeoutSeconds=30;

    // Getters
    public String getRequestUrl() {
        return requestUrl;
    }

    public String getAppId() {
        return appId;
    }

    public String getApiSecret() {
        return apiSecret;
    }

    public String getApiKey() {
        return apiKey;
    }

    public String getDefaultGroupId() {
        return defaultGroupId;
    }

    public int getMaxRetryTimes() {
        return maxRetryTimes;
    }

    public int getTimeoutSeconds() {
        return timeoutSeconds;
    }

    @Override
    public String toString() {
        return "VoiceprintConfig{" +
                "requestUrl='" + requestUrl + '\'' +
                ", appId='" + appId + '\'' +
                ", defaultGroupId='" + defaultGroupId + '\'' +
                ", maxRetryTimes=" + maxRetryTimes +
                ", timeoutSeconds=" + timeoutSeconds +
                '}';
    }
}